Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api connection type #13612

Merged

Conversation

remibettan
Copy link
Contributor

Tracked by: RSDSO-18237

@remibettan remibettan requested a review from Nir-Az December 17, 2024 13:33
@Nir-Az
Copy link
Collaborator

Nir-Az commented Dec 18, 2024

Hey, let's speak about this PR

@@ -170,6 +170,7 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< const device_info > const &
if( j.nested( "product-line" ).get_ex( str ) )
register_info( RS2_CAMERA_INFO_PRODUCT_LINE, str );
register_info( RS2_CAMERA_INFO_CAMERA_LOCKED, j.nested( "locked" ).default_value( true ) ? "YES" : "NO" );
register_info( RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR, "DDS" );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connection_type

@@ -965,6 +965,8 @@ namespace librealsense

if (usb_modality)
register_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR, usb_type_str);
else
register_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR, "GMSL");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connection_type

if(device_pid == "ABCD")// Specific for D457
auto connection_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);

if (connection_type == std::string("USB") && dev.supports(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation looks off

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

register_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR, usb_type_str);
}
else
register_info(RS2_CAMERA_INFO_CONNECTION_TYPE, "GMSL");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this list D457 Recovery DFU PID as GMSL as well?
Or we might need to do it elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior for D457 Recovery DFU PID will not be changed.
Today, it seems that no "USB" and no "GMSL" will appear with this device.
Do you need me to check?

@@ -47,20 +47,26 @@ namespace rs2

// Adjust settings according to USB type
bool usb3_device = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception use case is usb2.
Why not querying if it's USB2 and do
int requested_fps = (usb2_device) ? 15 : 30;
As I understand it, DDS/GMSL/USB3 should set 30 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"As I understand it, DDS/GMSL/USB3 should set 30 right?" this is the current code meaning - I assumed it is right

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current code works, but I think the logic is more complicated than needed.
You want to check USB2 vs all other
15 vs 30
So better to condition USB2 against all other right?
Currently you have
usb_device
usb3_device..

if( dev_type == "ABCD" ) // Specific for D457
dev_type = "GMSL";
dev_type = dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
if (dev_type == "USB")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& support...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@remibettan remibettan requested a review from Nir-Az January 1, 2025 12:37
Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@remibettan remibettan merged commit 509f0bf into IntelRealSense:development Jan 2, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants